# Created by 黄景涛
# DATE: 2025/4/15

import random
from request_task import post_task, get_task
from async_run import async_main


def get_biz_params(i):
    """ 构造params """
    data = {
        "sort": "bk_biz_id"
    }
    return data


if __name__ == '__main__':
    config = {"thread_count": 5, "task_count": 10}
    # add_inst_url = "http://cmdb.azure-bkee5.canwaysoft.com/table/biz/0"
    add_inst_url = "http://cmdb.test.com/api/v3/biz/simplify"
    headers = {"Content-Type": "application/json",
               "Cookie": "blueking_language=zh-cn; http_scheme=http; bk_token=TDn6yiBeUAZevCPlQ6YYGsGSmLwtvqanp6N988Q4TI0; cc3=MTc0NDY4Mjk1MnxOd3dBTkVOVk5sQlRSRU5KV0VkUE0wOUZNa0ZSUjBWRVJsSlVNa3hHVkRkTFZrd3pUbGMyV1ZsUFNrUkZXVVZETmtZMVNqZEhWMEU9fKUK_5exhNmm0PykTpKGnPgW-aSV6vcRXV_pJ_VdhKMR"
               # "Cookie": "blueking_language=zh-cn; http_scheme=http; bk_token=bkcrypt%24gAAAAABn_b67--h_1OyvrFULkWVa2nGGdlfqDnywLRbDzOlnZK8E3e7Ev7nU4vU5fR5fJd0zeHKgiIjJ6siM1juFfppW5Biu1tVWNEDNrHndKJX-Rly87eM%3D; cc3=MTc0NDY4MzQ1NXxOd3dBTkROSFJVMUJVamREU2pOTVdFc3pVRmszUmxOTVZrNUJSVkJSUkZKWFJFZEZVVTVaTjBGYVYwWmFNbEpGVVV0UVF6STJTMUU9fNh8pTItfUm919jXoQw-sLJXrC9utb7cWDXpvQ20RCJN",
               }
    async_main(config, get_task, get_biz_params, add_inst_url, headers)

